package com.hstcs.creator;

import com.badlogic.ashley.core.Entity;
import com.hstcs.assets.Assets;
import com.hstcs.assets.Common;
import com.hstcs.assets.FileName;
import com.hstcs.components.MovementComponent;
import com.hstcs.components.PlComponent;
import com.hstcs.components.TransformComponent;
import com.hstcs.game.God;

public class PlCreator implements EntityCreator {

	public static void createBlood(Entity monster){
		Entity entity = new Entity();
		PlComponent pl = new PlComponent();
		pl.effect = Assets.pools.get(FileName._BLOOD).obtain();
		MovementComponent movement = new MovementComponent();
		TransformComponent position = new TransformComponent();
		
		position.pos.x = monster.getComponent(TransformComponent.class).pos.y;
		position.pos.y = monster.getComponent(TransformComponent.class).pos.y;
		position.pos.z = Common.DEPTH_MONSTER;
		position.rotation = -monster.getComponent(TransformComponent.class).rotation;
		
		pl.effect.setPosition(position.pos.x, position.pos.y);
		
		entity.add(pl);
		entity.add(position);
		//entity.add(movement);
		System.out.println("ttttttttttttttttttttttttttttttttttttttttttttttttttt");
		God.instance.engine.addEntity(entity);
		
	}
}
